home *** CD-ROM | disk | FTP | other *** search
- # return to directory previously saved on the directory stack
- # (see also push).
- #
- # Pop is presented as is; no warrantee is either expressed or implied
- # as to it's suitability to any purpose whatsoever. You assume all the
- # risk for all damage, even if caused by a defect in the software,
- # no matter how awful.
- if #argv != 1
- echo usage: $0
- elseif !?Dir_stack
- echo no Directory stack
- elseif Dir_stack<1
- echo Directory stack empty
- elseif Dir_stack>size(Push_dirs)
- echo Directory stack overflowed
- else
- Dir_stack--
- cd $Push_dirs[$Dir_stack]
- Push_dirs[Dir_stack]=""
- if Dir_stack==0
- unset Dir_stack Push_dirs
- if ?_debug
- echo releasing Dir_stack
- endif
- endif
- return 0
- endif
- return 10
-